package com.example.domain.entity;

import javax.persistence.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * 价目条目实体类
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "price_list_entries")
public class PriceListEntry extends SoftDeleteEntity {

    @Id
    @Column(name = "id", length = 26)
    private String id;

    @Column(name = "price_list_id", length = 26, nullable = false)
    private String priceListId;

    @Column(name = "product_id", length = 26, nullable = false)
    private String productId;

    @Column(name = "unit_price", precision = 18, scale = 4, nullable = false)
    private BigDecimal unitPrice;

    @Column(name = "base_unit", length = 20, nullable = false)
    private String baseUnit;
}

